package com.eastfair.config.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * Date:2021/11/8
 * Time:16:43
 *
 * @author zjn
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class MessageTemplate {

    /**
     * 校验标识 获取单个消息模板
     */
    public interface VerifyGetByEntity {
    }

    /**
     * 标识id
     */
    @JsonFormat(shape= JsonFormat.Shape.STRING)
    private Long flagId;

    /**
     * 外部模板id
     */
    private Integer mailingId;

    /**
     * 标题
     */
    private String title;

    /**
     * 类型
     */
    @NotBlank(groups = {VerifyGetByEntity.class})
    private String type;

    /**
     * 内容
     */
    private String content;

    /**
     * 语言环境
     */
    @NotBlank(groups = {VerifyGetByEntity.class})
    private String languageType;

    /**
     * 语言环境
     */
    private Integer isEnabled;

}
